home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-2.iso / extra / ny_002.zip / 3RDPARTY.DOC next >
Text File  |  1995-09-23  |  13KB  |  282 lines

  1. ==============================================================================
  2. NY2008 Third Party Development Manual (update 9)
  3. ==============================================================================
  4.  
  5. > NEW STUFF THAT WAS ADDED IN UPDATE 6!
  6. | NEW STUFF THAT WAS ADDED IN UPDATE 7!
  7. * NEW STUFF THAT WAS ADDED IN UPDATE 8!
  8. @ NEW STUFF THAT WAS ADDED IN UPDATE 9!
  9.  
  10. > From wide beta 7 up the .inf drop file has changed format a bit, READ ON
  11. > if you made any IGM's for wide beta 6 or lower!
  12.  
  13. @ You can now add IGMs to be fight events. You just create a file called
  14. @ 3rdevent.dat with same format as 3rdparty.dat. If this file exists NY2008
  15. @ will sometimes ask the player instead of a fight event if he wants to enter 
  16. @ a randomly chozen IGM for the 3rdevent.dat file.
  17.  
  18. * There is a new type of character information file, the .stt file. The
  19. * name and location of this file is the same as for the n00?????.sts
  20. * file. The only difference is that it is written as a text file so it is
  21. * easier to read for you non-C programmers ... Read on
  22.  
  23. * If ya are too lazy to write a good installation program for your IGM then I 
  24. * included mine, it's easy to setup and use for almost any igm you make. Look
  25. * at it in the NY_IGMIN.ZIP file, which is included in the ny2008 main archive
  26. @ It now asks if the IGM should be added to 3rdparty.dat, 3rdevent.dat or both.
  27.  
  28.   Well ... so ya want to create something i haven't done already for NY2008
  29.   ...
  30.  
  31.   First a few tips on how i do stuff ... i LOVE binary files, whatever can be
  32.   IS in binary format ...
  33.  
  34.   And read the struct.doc for the structures of those files and a few extra
  35.   tips ...
  36.  
  37.   User number is the number in the user file...
  38.  
  39.   DO NOT CHANGE how many points the user has in the user file... you can do it
  40.   as an IGM and pass the new point value back to NY2008, but do not do it to 
  41.   users anytime otherwise. It will messup the score file for the day ...
  42.   (Actually in an IGM you can change almost all the user data, xpt the level,
  43.   and the rank variable, those will change when ny2008 reads in the .sts file)
  44.  
  45.   To get info on the user that's online read in his .sts file, changing this
  46.   will not effect anything unless you are returning from an igm so don't 
  47.   change it otherwise.
  48.  
  49.   DO NOT REARANGE USERS!!!!! (WILL MESS UP VERY VERY BAD!)
  50.   (or if ya have to read the struct.doc file VERY carefully, but i would not
  51.   recomend it ... and this is absolutely not to be done in IGM's anywayz)
  52.  
  53.   Flags for users (flag files I mean) are named 
  54.  
  55.   U00<0 padded user number>.<flag name>
  56.  
  57.   And they are store in the FlagDirectory if it is specified in the .cfg file
  58.  
  59.   For example online flag for user 36 would look like "U0000036.ON"
  60.  
  61.  
  62.   The temporary character dropfile is named (it is stored in the game
  63.   directory not in the flag didrectory!)
  64.  
  65.   N<0 padded node number>.STS
  66.  
  67.   For example .STS file for node 6 would look like "N0000006.STS"
  68.  
  69.   NOTE: There is also a flagfile called U00?????.STS ... this is used for
  70.   data recovery and if you dump any data in here it will not be read unless
  71.   the crash recovery is run ...
  72.  
  73. ==============================================================================
  74. How to create In Game Modules for NY2008!
  75. ==============================================================================
  76.  
  77. | If You'd like to see how an IGM looks inside look at NY_JPSRC.ZIP which  
  78. | is the source code for the Jackpot IGM.
  79.  
  80.   To create NY2008 IGM's you actually create something like a door, only
  81.   easier, because you anly have to deal with one type of dropfile and one
  82.   character information file. These will be created in the game directory, so
  83.   you will have to get that information from the user. (I'd recomend having
  84.   it passed on the command line rather than having it read from a cfg file.)
  85. * There are two character dropfiles you can choose from now on ... so it's
  86. * easier for non-C programmers.
  87.  
  88.   NY2008 will pass the node number, the user number and if the game is local
  89.   or not, through the command line, by adding '-N<node number> -U<user number>'
  90.   and optionally '-L' if the game is in local mode, to the command line when
  91.   calling the IGM. '-L' is passed every local game no matter if it was started
  92.   from command line or from a dropfile.
  93.  
  94. @ You have to create or edit '3rdparty.dat' and/or '3rdevent.dat' and put in
  95. > appearance to user first and the command line on the second line. Comments
  96. * are OK! (comment lines start with ';'!) -  there can be any number of IGM's!
  97. * As i said above i'd recommend passing the path to the dropfiles on the
  98.   command line!
  99.  
  100. @ '3rdparty.dat' file will add your IGM to the other stuff menu!
  101. @ '3rdevent.dat' file will add your IGM as a random fight event! 
  102.  
  103.   Example:
  104.     `@B`4ar
  105.     C:\NY2008\BAR.BAT C:\BBS\NY2008\
  106.  
  107.   And the BAR.BAT would look like:
  108.  
  109.     cd\bar
  110.     bar.exe %1 %2 %3 %4
  111.     cd\ny2008
  112.  
  113.   Don't worry about changing dirs back ... ny2008 will do that by itself.
  114.   But the IGM will be run as the game dir of ny2008 as the current dir!!!!
  115.  
  116. > There is also a new feature if you want NY2008 to change to the IGM's dir
  117. > before it is run, you add '*' as the VERY FIRST character in the command
  118. > line!
  119.  
  120. > Example:
  121. >   `@B`4ar
  122. >   *C:\NY2008\BAR\BAR.EXE C:\BBS\NY2008\
  123.  
  124. > This will run BAR.EXE in it's own dir (c:\ny2008\bar) so you don't need to
  125. > write a bat file as in the example above!
  126.  
  127.  
  128.   THE FILES: 
  129. @ You have to read both, and they are in the game directory, not the flag 
  130. @ directory! You can choose the character info file, but you have to read the 
  131. @ text version and delete the binary version, so that ny2008 knows you read 
  132. @ the text version, or just read the binary version, you don't have to delete 
  133. @ the text version, ny2008 will read the binary version as default, only if it 
  134. @ doesn't find it will it read the text version!
  135.  
  136.   The character information file (N<node number>.STS) is a binary file with
  137.   the user structure dumped into it. (read struct.doc) (this is the one you
  138.   can change!) (e.g. N0000003.STS for node 3)
  139.  
  140. * User rank and days user has been inactive will not be read in after an IGM
  141. * so it wouldn't kill the user or destroy others if they get changed in
  142. * the IGM.
  143.  
  144. * There is also a text character information file available too. if you want to
  145. * use that you have to delete the N<node number>.STS so that ny2008 will read
  146. * this file instead. The name for this file is N<node number>.STT!
  147. * It has the same data order as the character info structure, here it is:
  148. *
  149. * Line 1:  The BBS name of the user
  150. * Line 2:  The name of the character
  151. * Line 3:  What the user says when he wins
  152. * Line 4:  What the user says when he looses
  153. * Line 5:  User rank !!! Will not be read in !!!
  154. * Line 6:  Days the user has been inactive  !!! Will not be read in !!!
  155. * Line 7:  Attacking strenght of the user !!these will have a change only for!!
  156. * Line 8:  Defensive strenght             !!this level I recomend no change  !!
  157. * Line 9:  Condoms user has
  158. * Line 10: Days since the user last got laid
  159. * Line 11: The hits of drug that the user has
  160. * Line 12: If addicted how long the user has not used the drug
  161. * Line 13: User's hitpoints
  162. * Line 14: Maximum of the user's hitpoints
  163. * Line 15: User's points
  164. * Line 16: Money in hand
  165. * Line 17: Money in bank
  166. * Line 18: User level
  167. * Line 19: Fights the user has left today
  168. * Line 20: % of hunger
  169. * Line 21: Sex turns left today
  170. * Line 22: % of current std infection
  171. * Line 23: % of drug addiction
  172. * Line 24: % of how "high" the player is
  173. * Line 25: For how many more days the hotel is paid for
  174. * Line 26: How many days has the user has been in hospital
  175. * Line 27: If alive this is set to "ALIVE" if not consious "UNCONSIOUS"
  176. *          set this to "DEAD" if user died in the IGM (user has to start over!)
  177. * Line 28: "M" if male "F" if female
  178. * Line 29: what the user is:
  179. *          "PUNK", "HEADBANGER", "BIG FAT DUDE","CRACK ADDICT" or "HIPPIE"
  180. * Line 30: number of the user's weapon .... 0=hands, 1 pepper spray,...
  181. * Line 31: user'ss STD:
  182. *          "CRAPS", "HERPES", "SYPHILIS", "AIDS" or "NONE"
  183. * Line 32: user's drug:
  184. *          "POT", "HASH", "LSD", "COKE", "PCP" or "HEROIN"
  185. * Line 33: Where the user is staying:
  186. *          "NOWHERE", "MOTEL", "REGULAR HOTEL", "EXPENSIVE HOTEL"
  187. * Line 34: World trade center bombings left for today
  188. * Line 35: Water poisonings left for today
  189.  
  190.  
  191.   The dropfile is a textfile with the communication parameters written in it:
  192.   (e.g. U0000034.INF for user 34) (this is also the ... in IGM flag, so do not
  193.   modify it cuz it might change names if the maintanance runs on another node!)
  194.  
  195.   Line1: The path to the bbs dropfiles...(if you want to read those)
  196.      (they will not be available if game was run with the '-L' command
  197.      line option.
  198.   Line2: Callers time left
  199.   Line3: Com Port (0 based - COM1=0, COM2=1 ...)
  200.   Line4: Baud Rate
  201. > Line5: Either "ANSI","AVATAR" or "ASCII" depending on players terminal!
  202. > Line6: User's location
  203. > Line7: This is either "FOSSIL" if fossil driver is used or "NOFOSSIL" if not
  204.  
  205.   The rest of these settings is written to the dropfile only if FOSSIL is
  206.   disabled!
  207.  
  208. > Line8: Com port address
  209. > Line9: Com port IRQ
  210. > Line10: Either "FIFO" or "NOFIFO" depending if the 16550A FIFO buffer is used
  211. > Line11: The number of bytes that is placed in the FIFO buffer before trigger
  212. > Line12: Receive Buffer
  213. > Line13: Send Buffer
  214.  
  215.   That's it .... all the caller info you need is in the character file, but 
  216.   if you need something that's not here, read the first line of this dropfile 
  217.   which has the path to the bbs dropfiles. (also i do not recomend that .... 
  218.   it makes life of the sysop who installs the software not very easy to do 
  219.   job, since all you need is passed through this dropfile and the .sts file 
  220.   then there's no need to do anything else, and it will make the IGM's 
  221.   portable to any system.)
  222.  
  223.   Only the things that you change in the character file will be read in by 
  224.   NY2008. (Do not change the bbsname field in the character file as this could
  225.   have unpredictable results). 
  226.  
  227.   Also do not change the level of the user, the user will have his level 
  228.   raised when he returns back to the game (if he deserves it).
  229.  
  230. ==============================================================================
  231. How amounts work... for any add-on ...
  232. ==============================================================================
  233.  
  234.   The usuall points raise for a single fight is 10*(level+1) for better things 
  235.   make it a bit more.
  236.  
  237.   The money the user gets is calculated from the hitpoints of his enemy (plus 
  238.   some randomness):
  239.   (level+1)*(enemy_hitpoints*0.5 + randomf(enemy_hitpoints*.7))+(20*(level+1))
  240.  
  241.   This is to give you an idea how the money is calculated, take in account 
  242.   that the player will spend some money on healing.
  243.  
  244.   Generally try not to give out too much money or points for free .... 
  245.   gambling is good cuz that makles people loose money also.
  246.  
  247. ==============================================================================
  248. How to change users offline ...
  249. ==============================================================================
  250.  
  251.   if you want to write to the user file, do it when the user is offline ...
  252.   if the user is online there's no way you can edit him (unless if you edit
  253.   the .sts file from an IGM). (U00?????.ON will be present if user is online).
  254.  
  255. ==============================================================================
  256. Running stuff in maintanance
  257. ==============================================================================
  258.  
  259. * NY2008 has the option to run an external program after it's nightly
  260. * maintanance, just create 3rdmnt.bat and put whatever you want in there and
  261. * it will run it after every maintanance. Do not make your maintanance
  262. * too long since on most systems maintanance takes place when the first
  263. * user gets online. if you have something that takes long (maybe NPC's), just
  264. * ask the sysop installing your software to put it in his nightly maintanance
  265. * batch file.
  266.  
  267. * If you want to send remote output, there is a "3rdmnt.inf" file created,
  268. * it has the same format as the IGM dropfile, so look at that.
  269.  
  270. * You could also use the old style, and use the option in the .cfg file, but
  271. * no "3rdmnt.inf" is created for that one and I recomend strongly agains it
  272. * since the above way is just a better way to do it, and more flexible.
  273.  
  274. ==============================================================================
  275.  
  276.   Anywayz ... have fun ....
  277.  
  278.   Franz
  279.  
  280.   PS: I know i can be very cryptic and incomplete in instructions .... contact
  281.   me with any problems you might have.
  282.